<include file="__THEME__/header" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.form.js"></script>
<script type="text/javascript" src="{:U('weibo/plugins/init')}"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery.autocomplete.js"></script>


<div class="content"><!-- 内容 begin  --> 
    <include file="__THEME__/center_menu" />
    <div class="main">
        <div class="mainbox_C">
            <div class="mainbox_R">
                <div class="right_box">
                    <h2>粉丝榜</h2>
                    <ul>
                        <volist id="vo" name="topfollow">
                        <php>$num = ($i>3)?$i.".":"<span class='cRed'>".$i.".</span>";</php>
                        <li class="lineD_btm lh25"><em class="right alR" style="width:73px;">{$vo.count}</em>{$num} <space uid="vo.uid">{uname}</space></li>
                        </volist>
                    </ul>
                </div>
            </div>
            <div class="mainbox_CR"> 

                <!-- ========== 搜人 begin ============= -->
                <div class="Search_box">
                    <div><h1 class="f18px fB lh30" style="height:30px;">查找用户</h1></div>
                    <div class="cGray2 lh30"  style=" height:30px;">输入朋友的名称或昵称，如：小A</div>
                    <div class="Search_bg">
                        <div>
                            <form action="{:U('home/user/searchuser')}" method="post">
                                <input type="text" class="text" style="width:400px;" name="k" value="" />
                                <input class="btn_b" type="submit" value="搜索" />
                            </form>
                        </div>
                    </div>
                </div>
                <div class="tab-menu"><!-- 切换标签 begin  -->
                    <ul>
                        <li><a class="on feed_item" href="###"><span>推荐</span></a></li>
                        <li><a class="on feed_item" href="{:U('home/home/boy')}"><span>学哥</span></a></li>
                        <li><a class="on feed_item" href="{:U('home/home/girl')}"><span>学妹</span></a></li>
                    </ul>
                </div>
                <div class="MenuSub">
                    <a href="{:U('home/user/findfriend',array('type'=>'newjoin'))}" <eq name="type" value="newjoin">class="on"</eq> >最新加入</a>| 
                    <a href="{:U('home/user/findfriend',array('type'=>'understanding'))}" <eq name="type" value="understanding">class="on"</eq> >可能认识</a>| 
                    <a href="{:U('home/user/findfriend',array('type'=>'followers'))}" <eq name="type" value="followers">class="on"</eq> >粉丝最多</a>| 
                    <a href="{:U('home/user/findfriend',array('type'=>'hot'))}" <eq name="type" value="hot">class="on"</eq> >活跃用户</a>
                </div>
                <div class="feedBox">
                    <form action="{:U('home/Public/followuser')}" id="followuser" method="post">
                        <input type="hidden" name="doajax" value="1">
                        <ul class="feed_list">
                            <volist id="vo" name="list">
                            <li class="lineD_btm" style="width:50%; height:70px">
                            <div class="left" style="width:25px; padding-top:20px;"><input name="followuid[]" type="checkbox" checked="checked" value="{$vo.uid}" /></div>
                            <div class="userPic"><space uid="vo.uid">{uavatar}</space></div>
                            <div style="margin-left: 95px;" class="feed_c">
                                <div style="padding-bottom: 0pt;">

                                    <div class="right pr10" style="display:none;" id="follow_list_{$vo.uid}">
                                        <script>document.write(followState('{$vo.followstate}','dolistfollow',{$vo.uid}))</script>
                                    </div>

                                    <space uid="vo.uid">{uname}</space> {$vo.uid|getUserGroupIcon} ( {$vo.follower}人关注 )</div>
                                <div style="padding-top: 8px;" class="feed_c_btm lh18">
                                    <div>{$vo.location}&nbsp;</div>
                                    <switch name="type">
                                    <case value="newjoin">
                                    <div>加入时间:{$vo.ctime|friendLydate}</div>
                                    </case>
                                    <case value="hot">
                                    <div>博客文章数:{$vo.weibo_num}</div>
                                    </case>
                                    </switch>
                                </div>
                            </div>
                            </li>
                            </volist>

                        </ul>
                        <div  class="pt10 flw100"> 
                            <input name="" onclick="checkAllFollow(this)" type="checkbox"  checked="checked" />
                            <label for="checkbox"></label>
                            <input name="" type="button" onclick="dofollow()" class="btn_green" value="关注所选用户"  />
                             <div class="page">{$page} </div>
                        </div>
                    </div>

                    <!-- ========== 搜人 end ============= --> 
                    <div class="c"></div>
                </form>
            </div>
        </div>
       
        <div class="clear"></div>
    </div>
</div>
<!-- 内容 end -->
<script>
    function checkAllFollow(o){
        if( o.checked == true ){
            $("input[name='followuid[]']").attr('checked','checked');
            }else{
            $("input[name='followuid[]']").removeAttr('checked');
        }
    }

    function dofollow(){
        if( $("input[name='followuid[]']:checked").size() ==0){
            ui.error('请选择要关注的人');
            return '';
        }
        var options = {
            success: function(txt) {
                ui.success('关注成功');
                setInterval("location.reload()",1000);
            } 
        };		
        $('#followuser').ajaxSubmit( options );
    }
</script>
<include file="__THEME__/footer" /> 

